home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Arts Interactive 4
/
CARTS4.iso
/
mac
/
MiniCad 6.0.1 demo
/
MiniCad 6.0.1 Demo
/
MiniCad 6.0.1 Demo.rsrc
/
TEXT_1_old EPS Out Header.txt
< prev
next >
Wrap
Text File
|
1996-03-22
|
5KB
|
256 lines
/_mcdict where {pop} {/_mcdict 60 dict def} ifelse
_mcdict begin
% Basic Definitions
/gs {gsave} def
/gr {grestore} def
/t {translate} def
/sc {scale} def
/sg {setgray} def
/srgb {setrgbcolor} def
/ff {findfont} def
/mf {makefont} def
/sf {setfont} def
/slw {setlinewidth} def
/str {stroke} def
/slc {setlinecap} def
% Polyline operators
/pl % x y pl x y
{
transform
0.25 sub round 0.25 add exch
0.25 sub round 0.25 add exch
itransform
} def
/setstrokeadjust where
{
pop true setstrokeadjust
/c % x1 y1 x2 y2 x3 y3 c -
{curveto} def
/C /c load def
/v % x2 y2 x3 y3 v -
{currentpoint 6 2 roll curveto} def
/V /v load def
/y % x1 y1 x2 y2 y -
{2 copy curveto} def
/Y /y load def
/l % x y l -
{lineto} def
/L /l load def
/m % x y m -
{moveto} def
/dot
{currentpoint transform exch 1 add exch itransform lineto} def
}
{%else
/c
{pl curveto} def
/C /c load def
/v
{currentpoint 6 2 roll pl curveto} def
/V /v load def
/y
{pl 2 copy curveto} def
/Y /y load def
/l
{pl lineto} def
/L /l load def
/m
{pl moveto} def
/dot
{currentpoint transform exch 1 add exch itransform lineto} def
}ifelse
% Rectangle: left top right bottom R -
/rectangleDict 4 dict def
/R
{rectangleDict begin
/bottom exch def
/right exch def
/top exch def
/left exch def
right bottom m
right top L
left top L
left bottom L
right bottom L
closepath
end}
bind def
% Oval: left top right bottom OV -
/ovalDict 10 dict def
/OV
{ovalDict begin
/bottom exch def
/right exch def
/top exch def
/left exch def
/yrad bottom top sub 2 div def
/xrad right left sub 2 div def
/y yrad top add def
/x xrad left add def
x y t xrad yrad sc
newpath 0 0 1 0 360 arc closepath
1 xrad div 1 yrad div sc % Reverse scaling.
end}
bind def
% Rounded Rectangle: left top right bottom ovalwidth ovalheight RR -
/rRectangleDict 10 dict def
/RR {
rRectangleDict begin
2 div /hvy exch def
2 div /hvx exch def
/bottom exch def
/right exch def
/top exch def
/left exch def
/nleft hvx left add hvx div def
/ntop hvy top add hvy div def
/nright right hvx sub hvx div def
/nbottom bottom hvy sub hvy div def
hvx hvy sc
newpath
nright nbottom 1 90 0 arcn
nright ntop 1 360 270 arcn
nleft ntop 1 270 180 arcn
nleft nbottom 1 180 90 arcn
closepath
1 hvx div 1 hvy div sc
end
}
bind def
% Arc: left top right bottom startangle endangle A -
/arcDict 12 dict def
/A {
arcDict begin
/endangle exch def
/startangle exch def
/bottom exch def
/right exch def
/top exch def
/left exch def
/yrad bottom top sub 2 div def
/y yrad top add def
/xrad right left sub 2 div def
/x xrad left add def
x y t xrad yrad neg sc
0 0 1 startangle endangle arc
1 xrad div 1 yrad neg div sc % Reverse scaling.
end
}
bind def
% Polygon: xn yn ... x1 y1 n-1 P -
/polyDict 1 dict def
/P {
polyDict begin
/numOfPoints exch def
m numOfPoints {L} repeat
end
}
bind def
% Pattern fill: fR fG fB bR bG bB [p0 ... p7] patfill -
/fillDict 11 dict def
/patfill {
fillDict begin
gs
/fa exch def % Grab pattern.
srgb % Set background color.
17.3611 17.3611 sc % Scale back to 72 dpi from 1250.
flattenpath pathbbox % Get path bounding box.
/ury exch def
/urx exch def
/lly exch def
/llx exch def % Get edges.
clip
newpath
llx lly m
llx ury L
urx ury L
urx lly L
closepath fill % Fill in background color.
srgb % Set foreground color.
/w urx llx sub ceiling cvi def
/h ury lly sub ceiling cvi def
/bytes w 8 div ceiling cvi def
/patstr bytes 8 mul string def
/row 0 def
/patproc {
0 1 7 {
/row exch def
row bytes mul 1 row 1 add bytes mul 1 sub
{patstr exch fa row 8 mod get put} for
} for
patstr
} def
llx lly t
w h sc
w h true [w 0 0 h 0 0] patproc imagemask
gr
end
}
bind def
% Outline string show: string olshow -
/outlinedict 1 dict def
/olshow {
outlinedict begin
/cs 1 string def
{
cs 0 3 -1 roll put % Stuff the char into the string cs.
gs 1 sg cs show gr % Paint the char white and move back.
cs true charpath
currentpoint str m % Draw char outline.
} forall
end
}
bind def
% Shadow string show: string shadow-x shadow-y shshow -
/shadowdict 3 dict def
/shshow {
shadowdict begin
/shady exch def
/shadx exch def
/cs 1 string def
{
cs 0 3 -1 roll put % Stuff the char into the string cs.
currentpoint
shadx shady rmoveto % Draw shadow.
cs show m
gs 1 sg cs show gr % Paint char white.
cs true charpath
currentpoint str m % Draw char outline.
shadx 0 rmoveto % Move to next char position.
} forall
end
}
bind def
% Text Encoding Procedure
/Z % array literal literal direction Z -
{
pop
findfont begin
currentdict dup length 1 add dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/FontName exch def dup length 0 ne
{
/Encoding Encoding 256 array copy def
0 exch
{
dup type /nametype eq
{Encoding 2 index 2 index put pop 1 add}
{exch pop} ifelse
} forall
} if pop
currentdict dup end end
/FontName get exch definefont pop
} def
%%EndProlog